package korkd.tower;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class Splash extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        requestWindowFeature(Window.FEATURE_NO_TITLE);  
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,   
                                WindowManager.LayoutParams.FLAG_FULLSCREEN);  
        
        setContentView(R.layout.main);
        
        // Display and register start button
        final ImageButton start = (ImageButton) findViewById(R.id.start);
        start.setOnClickListener(new OnClickListener() {
        	@Override
        	public void onClick(View v) {
        		Intent i = new Intent(Splash.this,Game.class);
        		startActivity(i);
        	}
        });
        
        // TODO: Options button
        
        // Display and register exit button
        final ImageButton quit = (ImageButton) findViewById(R.id.exit);
        quit.setOnClickListener(new OnClickListener() {
        	@Override
        	public void onClick(View v) {
        		Splash.this.finish();
        	}
        });
    }
}